package eCheque;

/**
 * Exception thrown when a user attempts to create an account that already
 * exists on their filesystem
 * 
 * @author Steve Pennington
 * 
 */
@SuppressWarnings("serial")
public class DuplicateAccountException extends Exception {

	private EChequeRegisteration account;

	public DuplicateAccountException(EChequeRegisteration account) {
		super("Duplicate account number: " + account.getAccountNumber());
		this.account = account;
	}

	/**
	 * @return the account
	 */
	public EChequeRegisteration getAccount() {
		return account;
	}
}
